<?php
/**
 * Created by PhpStorm.
 * User: lixy
 * Date: 2017/1/11
 * Time: 16:42
 */
use yii\helpers\Url;

$web = Url::base();
?>
<?php
    $i=-1;
    foreach($track_record as $item){
        $i++;
        if($i==0){
?>
            <div class="message-last">
                <div class="guide-line-last"></div>
                <div class="contener">
                    <img class="current-img" src="<?=$web?>/images/mall/logistics-cur-img.png"/>
                    <p class="location"><?= $item->status ?></p>
                    <p class="timer"><?= $item->time ?></p>
                </div>

            </div>
<?php
            continue;
        }
        if($i==count($track_record)-1){
?>
            <div class="message-first">
                <div class="guide-line-first"></div>
                <div class="contener">
                    <img class="logistics-img" src="<?=$web?>/images/mall/logistics-img.png"/>
                    <p class="location"><?= $item->status ?></p>
                    <p class="timer"><?= $item->time ?></p>
                </div>
            </div>
<?php
            continue;
        }
?>
        <div class="message-center">
            <div class="guide-line-center"></div>
            <div class="contener">
                <img class="logistics-img" src="<?=$web?>/images/mall/logistics-img.png"/>
                <p class="location"><?= $item->status ?></p>
                <p class="timer"><?= $item->time ?></p>
            </div>
        </div>
<?php
    }
?>
